package me.lubinn.Incantatio.Spells;

import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;

import org.bukkit.Material;
import org.bukkit.event.player.PlayerChatEvent;

public class DurationSpell extends Spell 
{
	protected Timer timer = new Timer();
	
	protected int delay = 0;
	protected int period = 100;
	
	TimerTask task = new TimerTask()
	{
		public void run()
		{
			//code goes here;
		}
	};

	public Spell CastSpell(PlayerChatEvent event, Material mat, int size,
			Map<String, Boolean> augments) 
	{
		timer.scheduleAtFixedRate(task, delay, period);
		return this;
	}
}

//TEMPLATE FOR DURATIONSPELLS
//
//class Foo extends DurationSpell
//{
//	int foo;
//	int bar;
//	int foobar;
//	
//	Foo()
//	{
//		task = new TimerTask()
//		{
//			public void run()
//			{
//				return;
//			}
//		};
//		delay = 14;
//		period = 314;
//	}
//}
